home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / OpenDoc / PictPart / Source ƒ / $Utilities / PartUtils.h < prev   
Encoding:
C/C++ Source or Header  |  1995-04-22  |  1.2 KB  |  60 lines  |  [TEXT/MPCC]

  1. /*
  2.     File:        PartUtils.h
  3.  
  4.     Contains:    Part utility functions & classes
  5.  
  6.     Owned by:    Reggie Adkins
  7.  
  8.     Change History (most recent first):
  9.  
  10.     <5>    4/14/95    JS        Updated for Developer Release 2
  11.     <2>    3/8/95    JS        Updated to b1c13/c14
  12.     <1>    2/2/95    RA        first checked in
  13.     <0>    PartMaker source by E, Soldan, T. Çelik, J. Alfke, R. Adkins, J. Schalk
  14. */
  15.  
  16.  
  17. #ifndef _PARTUTILS_
  18. #define _PARTUTILS_
  19.  
  20. #ifndef __EVENTS__
  21. #include <Events.h>
  22. #endif
  23.  
  24. #ifndef __DIALOGS__
  25. #include <Dialogs.h>
  26. #endif
  27.  
  28. //----------------------------------------------------------------------------------------
  29.  
  30. class ODSession;
  31. class ODWindow;
  32. struct ODPoint;
  33.  
  34. extern ODSession* gSession;
  35.  
  36. #define TopLeft(aRect)    (* (Point *) &(aRect).top)
  37. #define BotRight(aRect)    (* (Point *) &(aRect).bottom)
  38.  
  39. #define Width(aRect)    ((aRect).right-(aRect).left)
  40. #define Height(aRect)    ((aRect).bottom-(aRect).top)
  41.  
  42. //----------------------------------------------------------------------------------------
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. extern pascal Boolean MyDialogFilter(DialogPtr dialog, EventRecord* event, short* itemHit);
  49.  
  50. extern void GetWindowPoint(ODWindow *w, Environment *ev,
  51.                             Point globalPoint,
  52.                             ODPoint *localPoint);
  53.  
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57.  
  58. #endif
  59.  
  60.